Release 10.1A: OpenEdge Application Server:
Administration
How dynamic code-page support works
In dynamic code-page support, each Web request sent by the browser indicates, directly or indirectly, the name of the code page it is encoded in. The developer modifies the application to make this happen. Typically, the initial Web page of the application displays a preselected list of languages or nationalities, from which the user selects.
When a Web request reflecting a response to a language-selection page is received by the agent, the application:
- Notes the language or nationality selected.
- Determines the corresponding code page.
- Determines the MIME version (as opposed to the OpenEdge version) of the code-page name.
- Converts the MIME version of the code-page name to the OpenEdge version.
- Sets a cookie called
wscharsetto the MIME version of the code-page name.Or:
Sets a query field or a hidden-form field called
wscharsetto the MIME version of the code-page name.When a Web request reflecting a response to a Web page other than a language-selection page is received by the agent, WebSpeed’s
web-disp.pprocedure:
- Searches for the code-page name in a query field called
wscharsetor a hidden-form field calledwscharset. If the code-page name was not found, it searches in a cookie calledwscharset.- Converts the code-page name from MIME format to OpenEdge format and stores the result in the
WEB-CONTEXThandle’sHTML-CHARSETattribute.Then, the application ensures that the MIME version of the code-page name will appear in the Web page the application will create. The technique used depends on whether the Web page is created using static HTML or dynamic HTML. For example:
- If the Web page is created using static HTML, the application should contain a
METAtag with the MIME version of the code-page name, as in the following:
- If the Web page is created using dynamic HTML, the application uses the
OUTPUT-CONTENT-TYPE()WebSpeed API function to insert the MIME version of the code-page name into the HTML document.Once WebSpeed’s
web-disp.pprocedure stores the OpenEdge version of the code-page name inHTML-CHARSET, the agent usesHTML-CHARSETto perform the following code-page conversions:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |